import http from '../http/index'
import config from '../config/index'

class HomeService {
    async index (params) {
        return await http.getInstance().get(
            config.ApiUrl.index,
            params
        )
    }
    async getTemplate (params) {
        return await http.getInstance().post(
            config.ApiUrl.getTemplate,
            params
        )
    }

    async list (params) {
        return await http.getInstance().post(
            config.ApiUrl.list,
            params
        )
    }
    
    async clothesList (params) {
        return await http.getInstance().post(
            config.ApiUrl.clothesList,
            params
        )
    }
    
    async updateScene (params) {
        return await http.getInstance().post(
            config.ApiUrl.updateScene,
            params
        )
    }
    
    async updateAssets (params) {
        return await http.getInstance().post(
            config.ApiUrl.updateAssets,
            params
        )
    }
    
    async selectOne (params) {
        return await http.getInstance().get(
            config.ApiUrl.selectOne,
            params
        )
    }
}

export default new HomeService()